//
//  BaseViewController.m
//  yameishe
//
//  Created by zhi on 2017/2/8.
//  Copyright © 2017年 anteng. All rights reserved.
//

#import "BaseViewController.h"
#import "AppDelegate.h"
#import "LeftViewController.h"

#import <IQKeyboardManager/IQKeyboardManager.h>
#import <MMDrawerController/MMDrawerController.h>
#import <MMDrawerController/MMDrawerBarButtonItem.h>
#import <MMDrawerController/UIViewController+MMDrawerController.h>


@interface BaseViewController ()
@end

@implementation BaseViewController


- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.

}

- (void)enableOpenLeftDrawer:(BOOL)enable {
    if (enable == YES) {
        // 能打开
        UINavigationController *leftNav = [[UINavigationController alloc] initWithRootViewController:[[LeftViewController alloc] init]];
        [self.mm_drawerController setLeftDrawerViewController:leftNav];
    }else {
        // 不能打开
        [self.mm_drawerController closeDrawerAnimated:YES completion:^(BOOL finished) {
            [self.mm_drawerController setLeftDrawerViewController:nil];
        }];
        
    }
}

//- (void)enableOpenRightDrawer:(BOOL)enable {
//    if (enable == YES) {
//        UINavigationController *rightNav = [[UINavigationController alloc] initWithRootViewController:[[RightViewController alloc] init]];
//        [self.mm_drawerController setRightDrawerViewController:rightNav];
//    }else {
//        [self.mm_drawerController closeDrawerAnimated:YES completion:^(BOOL finished) {
//            [self.mm_drawerController setRightDrawerViewController:nil];
//        }];
//    }
//}
@end
